/*这是自己写的样式表*/


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #3498db;
    --secondary: #2c3e50;
    --accent: #9b59b6;
    --light: #ecf0f1;
    --dark: #1a1a2e;
    --success: #2ecc71;
    --warning: #f39c12;
    --danger: #e74c3c;
    --gray: #7f8c8d;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #0f1621, #1c2a3a);
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    background-attachment: fixed;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background-color: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    color: var(--primary);
    font-size: 2rem;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo span {
    color: var(--light);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    color: var(--light);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 5px 0;
    transition: var(--transition);
}

nav a:hover {
    color: var(--primary);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

nav a:hover::after {
    width: 100%;
}

.auth-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(52, 152, 219, 0.1) 0%, rgba(44, 62, 80, 0) 70%);
    z-index: -1;
}

.hero h2 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--light), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textGlow 3s infinite alternate;
}

@keyframes textGlow {
    0% {
        text-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
    }
    100% {
        text-shadow: 0 0 20px rgba(52, 152, 219, 0.8), 0 0 30px rgba(52, 152, 219, 0.6);
    }
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    color: #bdc3c7;
}

.search-bar {
    max-width: 600px;
    margin: 2rem auto;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.3);
}

.search-bar button {
    position: absolute;
    right: 5px;
    top: 5px;
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
}

.search-bar button:hover {
    background: #2980b9;
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    padding: 3rem 0;
}

/* Articles Section */
.articles-container {
    background: rgba(26, 26, 46, 0.6);
    border-radius: 15px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.article-card {
    background: rgba(44, 62, 80, 0.4);
    border-radius: 10px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(52, 152, 219, 0.3);
}

.article-img {
    height: 180px;
    background: linear-gradient(45deg, #3498db, #9b59b6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
}

.article-content {
    padding: 1.5rem;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    color: var(--gray);
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
}

.article-tag {
    display: inline-block;
    background: rgba(155, 89, 182, 0.2);
    color: var(--accent);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-bottom: 0.8rem;
}

.article-title {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    transition: var(--transition);
}

.article-title a {
    color: var(--light);
    text-decoration: none;
}

.article-title a:hover {
    color: var(--primary);
}

.article-excerpt {
    color: #bdc3c7;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.read-more {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.read-more:hover {
    gap: 10px;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-widget {
    background: rgba(26, 26, 46, 0.6);
    border-radius: 15px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.widget-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.author-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
}

.author-name {
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.author-bio {
    color: #bdc3c7;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.social-links a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.categories-list {
    list-style: none;
}

.categories-list li {
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.categories-list li:last-child {
    border-bottom: none;
}

.categories-list a {
    color: var(--light);
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    transition: var(--transition);
}

.categories-list a:hover {
    color: var(--primary);
}

.categories-list span {
    background: rgba(52, 152, 219, 0.2);
    color: var(--primary);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

.popular-posts .post {
    display: flex;
    gap: 1rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.popular-posts .post:last-child {
    border-bottom: none;
}

.post-img {
    min-width: 60px;
    height: 60px;
    border-radius: 8px;
    background: linear-gradient(45deg, var(--warning), var(--danger));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.post-content h4 {
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
}

.post-content a {
    color: var(--light);
    text-decoration: none;
    transition: var(--transition);
}

.post-content a:hover {
    color: var(--primary);
}

.post-content .date {
    color: var(--gray);
    font-size: 0.8rem;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: rgba(52, 152, 219, 0.2);
    color: var(--primary);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    transition: var(--transition);
    text-decoration: none;
}

.tag:hover {
    background: var(--primary);
    color: white;
}

/* Newsletter */
.newsletter {
    background: rgba(155, 89, 182, 0.1);
    border: 1px solid rgba(155, 89, 182, 0.2);
}

.newsletter p {
    color: #bdc3c7;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.newsletter-form input {
    width: 100%;
    padding: 0.8rem;
    border-radius: 5px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    margin-bottom: 0.8rem;
}

.newsletter-form button {
    width: 100%;
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.8rem;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background: #8e44ad;
}

/* Footer */
footer {
    background: rgba(11, 15, 22, 0.9);
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-widget h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-widget h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--primary);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    padding: 0.5rem 0;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-links a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

.footer-links i {
    width: 20px;
}

.copyright {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 900px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .hero h2 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    nav ul {
        gap: 1.2rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero {
        padding: 3rem 0;
    }
}

@media (max-width: 480px) {
    .articles-grid {
        grid-template-columns: 1fr;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }
}